/*
 * Part of the ACID Project
 * Developed in 2011 by Morgan Taschuk
 */
package acid.network;

import edu.asu.emit.qyan.alg.model.Graph;
import edu.asu.emit.qyan.alg.model.Vertex;
import edu.asu.emit.qyan.alg.model.abstracts.BaseVertex;

/**
 *
 * @author morgan
 */
public class AcidGraph extends Graph
{

    public void addEdge(int sourceId, int targetId, double weight)
    {
        //bidirectional!
        add_edge(sourceId, targetId, weight);
        add_edge(targetId, sourceId, weight);
    }

    public void addNode(int id)
    {
        BaseVertex vertex = new AcidVertex(id);
        _vertex_list.add(vertex);
        _id_vertex_index.put(vertex.get_id(), vertex);
        set_vertex_num(_vertex_num + 1);
    }
}
